﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
    
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5shiv.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="/bzbs/lostpick/other/static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="/bzbs/lostpick/other/static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="/bzbs/lostpick/other/lib/Hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css" href="/bzbs/lostpick/other/static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="/bzbs/lostpick/other/static/h-ui.admin/css/style.css" />
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>资讯列表</title>
<style>
body{
	background: url("/bzbs/manager/seat/img/bj.jpg") repeat;
	background-size: 100%;
}




.anniu{
		    display: inline-block;
    		padding: 2px 4px;
    		font-size: 11.844px;
    		font-weight: bold;
    		line-height: 14px;
    		color: #fff;
    		white-space: nowrap;
    		vertical-align: middle;
   			 background-color: #5eb95e;
        	overflow: hidden;
        	    border-radius: 3px;
	
	}
	</style>

</head>
<body>
<div class="page-container">
	<div class="mt-20">
		<table class="table table-border table-bordered table-bg table-hover table-sort table-responsive">
			<thead>
				<tr class="text-c">
					<th width="5"><input type="checkbox" name="" value=""></th>
					<th width="30">预约ID</th>
					<th width="100" >开始时间</th>
					<th width="100">结束时间</th>
					<th width="100">自习室名称</th>
					<th width="60">座位信息</th>
					<th width="140">自习室地点</th>
					<th width="80">预约状态</th>
					<th width="60">我的二维码</th>
				</tr>
			</thead>
			<tbody>
				<c:forEach items="${requestScope.orderList}" var="order">
				<tr class="text-c ">
					<td><input name="" type="checkbox" value=""></td>					<td>${order.orderId}</td>
					<td>${order.startTime}</td>
					<td >${order.endTime}</td>
					<td>${order.seat.room.roomName}</td>
					<td>${order.seat.row}排${order.seat.col}列</td>
					<td>${order.seat.room.address}</td>
					<td>
						<c:choose>
						<c:when test="${order.status=='有效'}"><span class="anniu">${order.status}</span></c:when>
						<c:when test="${order.status=='无效'}"><span class="anniu" style=" background-color:#FF7F24">${order.status}</span></c:when>
						<c:otherwise></c:otherwise>
							</c:choose>
					
					</td>
					
					
					<td><input type="button" id="${order.orderId}"  class="btn btn-secondary radius size-MINI" value="查看"></td>
					
				</tr>
				</c:forEach>
			</tbody>
		</table>
	</div>
</div>
<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="/bzbs/lostpick/other/lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="/bzbs/lostpick/other/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="/bzbs/lostpick/other/static/h-ui/js/H-ui.min.js"></script> 
<script type="text/javascript" src="/bzbs/lostpick/other/static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->



<script src="/bzbs/manager/layer/jquery-1.9.1.js"></script> <!-- 你必须先引入jQuery1.8或以上版本 -->
<script src="/bzbs/manager/layer/layer.js"></script>


<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="/bzbs/lostpick/other/lib/My97DatePicker/4.8/WdatePicker.js"></script> 
<script type="text/javascript" src="/bzbs/lostpick/other/lib/datatables/1.10.0/jquery.dataTables.min.js"></script> 
<script type="text/javascript" src="/bzbs/lostpick/other/lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript">
$('.table-sort').dataTable({
	"aaSorting": [[ 2, "asc" ]],//默认第几个排序
	"bStateSave": true,//状态保存
	"pading":false,
	"aLengthMenu":[3, 5, 10],
	"pageLength":3,
});

$(".btn").click(function () {
    var imgId=$(this).attr("id");
	$.ajax({
		url:"../order/code.do?imgId="+imgId,
		type : "GET",
		dataType : "text",
		success : function(data) {
			if(data=="01"){
				layer.open({
					  type: 1,
					  title: false,
					  closeBtn: 0,
					  area: ['500px', '500px'],
					  skin: 'layui-layer-nobg', //没有背景色
					  shadeClose: true,
					  content: "<img src='/bzbs/zhanzuo/codeimg/"+imgId+".jpg'>"
					}); 
			}else{
				layer.alert('查看失败,请联系管理员', {icon: 6});
			}
		},
		error : function() {
			layer.alert('系统错误，请联系管理员', {icon: 6});
		}
	});
    
})
function nihao(){
	alert(this);
	var imgId=$(this).attr("id");
	alert("你好"+imgId);
	/* layer.open({
		  type: 1,
		  title: false,
		  closeBtn: 0,
		  area: ['auto'],
		  skin: 'layui-layer-nobg', //没有背景色
		  shadeClose: true,
		  content: "<img src='/bzbs/manager/seat/img/bj.jpg'>"
		}); */
}










</script> 
</body>
</html>